Completion.fuzzyMatch

This helper function can do a fuzzy match for you giving a haystack and casefolded needle.

Casefold your needle using [func@GLib.utf8_casefold] before running the query.

Score will be set with the score of the match upon success. Otherwise, it will be set to zero.

class Completion
static
bool
fuzzyMatch
(
string haystack
,,
out uint priority
)

Parameters

haystack string

the string to be searched.

casefoldNeedle string

A g_utf8_casefold() version of the needle.

priority uint

An optional location for the score of the match

Return Value

Type: bool

%TRUE if @haystack matched @casefold_needle, otherwise %FALSE.

Meta